<%-- 
    Document   : newjsp
    Created on : Oct 28, 2009, 3:50:43 AM
    Author     : Phong
--%>

<%@page contentType="text/html" pageEncoding="UTF-8" import="java.util.*,DAOClass.InfoMember"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">


        <link rel="stylesheet" href="../css/style.css" />
		<link rel="stylesheet" href="../css/front.css"  />
        <title>JSP Page</title>
    </head>
    <body>
        <jsp:useBean id="mem" class="DAOClass.Members" >

        </jsp:useBean>
        
        <table width="1024" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" align="center">
            <!--DWLayoutTable-->
            <tr>
                <td width="1024" height="157" valign="top" background="../images/Banner.jpg">

                </td>
            </tr>
            <tr>
                <td height="463" valign="top">
                    <table width="100%" border="0" cellpadding="2" cellspacing="2">
                        <!--DWLayoutTable-->
                        <tr>
                            <td height="28" colspan="2" valign="top" background="../images/top_button.gif">
                            </td>
                        </tr>
                        <tr>
                            <td width="150" height="537" valign="top" style="background-color:#D3D3D3">

                                <!-- MENU -->
                                <%@include file="menu.jsp" %>
                                <!--END MENU-->	</td>
                           
                            <td width="858" align="center" valign="top" style="margin-top:30px">


                                <%
            ArrayList<InfoMember> listMember = new ArrayList<InfoMember>();
            listMember = mem.getMembers();

                                %>
                                     <h2 style="margin-top:30px">User Management</h2>
                                <table border="1" width="95%" align="center">
                                    <tr>
                                        <td> UserName</td>
                                        <td> FullName</td>
                                        <td> Address</td>
                                        <td> BirthDay</td>
                                        <td> Email</td>
                                        <td>Group</td>
                                        <td>Status</td>
                                    </tr>
                                    <%
        if (listMember.size() > 0) {
            for (int i = 0; i < listMember.size(); i++) {
                String strUser = listMember.get(i).getUserName();
                int intIDG = listMember.get(i).getGroup();
                String strName = listMember.get(i).getFullName();
                String strBirthDay = listMember.get(i).getBirthDay();
                String strAdd = listMember.get(i).getAddress();
                String strMail = listMember.get(i).getEmail();
                int intStatus = listMember.get(i).getStatus();

                                    %>
                                    <tr>

                                        <td>
                                            <%=strUser%>
                                        </td>
                                        <td>
                                            <%=strName%>
                                        </td>
                                        <td>
                                            <%=strAdd%>
                                        </td>
                                        <td>
                                            <%=strBirthDay%>
                                        </td>
                                        <td>
                                            <%=strMail%>
                                        </td>
                                        <td>
                                            <%=intIDG%>
                                        </td>
                                        <td>
                                            <%=intStatus%>
                                        </td>
                                    </tr>
                                    <%
            }
        } else {
                                    %>
                                    <tr>
                                        <td colspan="7">There are no Members in Members List</td>
                                    </tr>
                                    <%            }
                                    %>

                                </table

                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>

    </body>
</html>
